﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Aplicacion/Vista/ModeloPrincipal.master" AutoEventWireup="true" CodeFile="EliminarBodega.aspx.cs" Inherits="Aplicacion_Vista_EliminarBodega" %>

<asp:Content ID="Content1" ContentPlaceHolderID="titulo" Runat="Server">
<title>Administraci&oacute;n de Bodegas - Eliminar Bodega</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ruta" Runat="Server">
<strong style="font-size:12px;">Inicio --> Principal <%:(String)Session["nombreRol"]%>--> Bodegas --> Eliminar Bodega </strong>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="informacionSesion" Runat="Server">
<div class="Block">
                            <div class="Block-body">
                                <div class="BlockHeader">
                                    <div class="header-tag-icon">
                                        <div class="BlockHeader-text">
                                            Informaci&oacute;n de sesi&oacute;n 
                                        </div>
                                    </div>
                                    <div class="l"></div>
                                    <div class="r"><div></div></div>
                                </div>
                                <div class="BlockContent">
                                    <div class="BlockContent-tl"></div>
                                    <div class="BlockContent-tr"><div></div></div>
                                    <div class="BlockContent-bl"><div></div></div>
                                    <div class="BlockContent-br"><div></div></div>
                                    <div class="BlockContent-tc"><div></div></div>
                                    <div class="BlockContent-bc"><div></div></div>
                                    <div class="BlockContent-cl"><div></div></div>
                                    <div class="BlockContent-cr"><div></div></div>
                                    <div class="BlockContent-cc"></div>
                                    <div class="BlockContent-body">
                                        <div>
                                            
                                            <table>
                                                <tr>
                                                    <td colspan="2">Usted se encuentra conectado como :</td>
                                                </tr>    
                                                <tr>
                                                    <td colspan = "2"><strong><%:(String)Session["nombreUsuario"]%></strong></td>
                                                </tr>
                                                <tr>
                                                    <td colspan = "2">Y su rol en el sistema es :</td>
                                                </tr>
                                                <tr>
                                                    <td colspan = "2"><strong><%:(String)Session["nombreRol"]%></strong></td>
                                                </tr>
                                                <tr>
                                                    <td colspan = "2"><asp:LinkButton ID="LinkButton1" runat="server" 
                                                            onclick="LinkButton1_Click">Cerrar Sesi&oacute;n</asp:LinkButton></td>
                                                </tr>    
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="menuLateral" Runat="Server">
<div class="Block">
                            <div class="Block-body">
                                <div class="BlockHeader">
                                    <div class="header-tag-icon">
                                        <div class="BlockHeader-text">
                                            Men&uacute;
                                        </div>
                                    </div>
                                    <div class="l"></div>
                                    <div class="r"><div></div></div>
                                </div>
                                <div class="BlockContent">
                                <div class="BlockContent-tl"></div>
                                    <div class="BlockContent-tr"><div></div></div>
                                    <div class="BlockContent-bl"><div></div></div>
                                    <div class="BlockContent-br"><div></div></div>
                                    <div class="BlockContent-tc"><div></div></div>
                                    <div class="BlockContent-bc"><div></div></div>
                                    <div class="BlockContent-cl"><div></div></div>
                                    <div class="BlockContent-cr"><div></div></div>
                                    <div class="BlockContent-cc"></div>
                                    <div class="BlockContent-body">
                                        <ul>
                                                <li><a href="Bodegas.aspx">Volver atr&aacute;s</a></li>
                                                
                                        </ul>  
                                    </div>
                                </div>
                            </div>
                        </div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="contenidoPagina" Runat="Server">
<div class="Post">
                            <div class="Post-tl"></div>
                            <div class="Post-tr"><div></div></div>
                            <div class="Post-bl"><div></div></div>
                            <div class="Post-br"><div></div></div>
                            <div class="Post-tc"><div></div></div>
                            <div class="Post-bc"><div></div></div>
                            <div class="Post-cl"><div></div></div>
                            <div class="Post-cr"><div></div></div>
                            <div class="Post-cc"></div>
                            <div class="Post-body">
                        <div class="Post-inner">
                            <h2 class="PostHeaderIcon-wrapper">
                                <span class="PostHeader">Bienvenido <%:Session["nombreRol"]%></span>
                            </h2>
                            <div class="PostContent">
                                
                                <h1>Eliminar bodega</h1>
                                <p>Para <strong>eliminar esta bodega</strong> , ingrese la informaci&oacute;n requerida en el formulario.
                                Si desea volver a la p&aacute;gina anterior sin eliminar la bodega, utilize el bot&oacute;n <strong>Volver atr&aacute;s</strong> 
                                    que se encuentra el el menú a su izquierda.</p>
                                                 
                                <p>Ingrese la informaci&oacute;n referente a la bodega que desea eliminar: </p> 
                                
                                    
                                <div class="Block">
                            <div class="Block-body">
                                <div class="BlockHeader">
                                    <div class="header-tag-icon">
                                        <div class="BlockHeader-text">
                                            Formulario de eliminaci&oacute;n de bodega 
                                        </div>
                                    </div>
                                    <div class="l"></div>
                                    <div class="r"><div></div></div>
                                </div>
                                <div class="BlockContent">
                                    <div class="BlockContent-tl"></div>
                                    <div class="BlockContent-tr"><div></div></div>
                                    <div class="BlockContent-bl"><div></div></div>
                                    <div class="BlockContent-br"><div></div></div>
                                    <div class="BlockContent-tc"><div></div></div>
                                    <div class="BlockContent-bc"><div></div></div>
                                    <div class="BlockContent-cl"><div></div></div>
                                    <div class="BlockContent-cr"><div></div></div>
                                    <div class="BlockContent-cc"></div>
                                    <div class="BlockContent-body">
                                        <div>
                                           <table width="100%">
                                    <tr>
                                        <td>Deseo eliminar la bodega :</td>
                                        <td><asp:TextBox ID="TextBox1" runat="server" 
                                                ToolTip="Nombre de la bodega que desea eliminar" Height="24px" 
                                                Width="179px" ForeColor="Red" ReadOnly></asp:TextBox></td>
                                                <asp:TextBox ID="TextBox2" runat="server" Height="20px" Width="179px" Visible="false"></asp:TextBox>
                                                <asp:TextBox ID="TextBox5" runat="server" Height="20px" Width="179px" Visible="false"></asp:TextBox>
                                         <td>departamento :</td>
                                        <td><asp:TextBox ID="TextBox3" runat="server" 
                                                ToolTip="Departamento al cual pertenece la bodega que desea eliminar" Height="24px" 
                                                Width="179px" ForeColor="Red" ReadOnly></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td>Asignar&eacute; los materiales a &eacute;sta bodega :</td>
                                        <td>
                                            <asp:DropDownList ID="DropDownList2" runat="server" 
                                                DataSourceID="ObjectDataSource1" DataTextField="Nombre" DataValueField="depto" 
                                                Height="24px" Width="179px">
                                            </asp:DropDownList>
                                            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                                                SelectMethod="getOtrasBodegas" TypeName="ModeloEliminarBodega">
                                                <SelectParameters>
                                                    <asp:ControlParameter ControlID="TextBox5" Name="codBodega" PropertyName="Text" 
                                                        Type="String" />
                                                    <asp:ControlParameter ControlID="TextBox4" Name="deptoBodega" 
                                                        PropertyName="Text" Type="String" />
                                                </SelectParameters>
                                            </asp:ObjectDataSource>
                                        </td>
                                        <td>departamento :</td>
                                        <td><asp:TextBox ID="TextBox4" runat="server" 
                                                
                                                ToolTip="Departamento al que pertenece la bodega a la cual asignar&aacute; los materiales de la bodega que desea eliminar" Height="24px" 
                                                Width="179px" ForeColor="Red" ReadOnly></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <asp:Button ID="Button1" runat="server" Text="Eliminar bodega" 
                                                ToolTip="Presionar para eliminar la bodega y asignar los materiales de ella a la bodega seleccionada" onclick="Button1_Click" 
                                                 /></td>
                                    </tr>
                                    </table>
                                    <p style="color:Red;">
                                        <%
                                            if ((new ControladorEliminarBodega().getDataMsg()) != "" && TextBox2.Text == "1" )
                                            {
                                                Response.Write(new ControladorEliminarBodega().getDataMsg());
                                            } 
                                          
                                        %>
                                        </p>
                                    <p style="color:Red;">
                                       
                                        <%
                                            if ((new ControladorEliminarBodega().getOpMsg()) != "" && (new ControladorEliminarBodega().getErrorCode()) == "" && TextBox2.Text == "1")
                                            {
                                                Response.Write(new ControladorEliminarBodega().getOpMsg());
                                            } 
                                          
                                        %>
                                     </p>

                                    <p style="color:Green;">
                                        <%
                                            if ((new ControladorEliminarBodega().getOpMsg()) != "" && (new ControladorEliminarBodega().getErrorCode()) == "1" && TextBox2.Text == "1")
                                            {
                                                Response.Write(new ControladorEliminarBodega().getOpMsg());
                                            } 
                                          
                                        %>
                                     </p>
                                
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>                                  
                            </div>
                            <div class="cleared"></div>
                        </div>                        
                            </div>
                        </div>
</asp:Content>

